package com.dyc.caradvertisting.ui.fmt.tab.consult;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import com.dyc.caradvertisting.R;
import com.dyc.caradvertisting.base.BaseLazyMainFragment;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 咨询
 */
public class ConsultFragment extends BaseLazyMainFragment {
    @BindView(R.id.banner_adv)
    Banner bannerAdv;
    @BindView(R.id.banner_madv)
    Banner bannerMadv;
    List<String> adv=new ArrayList<>();
    List<String> madv=new ArrayList<>();
    public ConsultFragment() {
        // Required empty public constructor
    }

    public static ConsultFragment newInstance() {
        ConsultFragment fragment = new ConsultFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }


    @Override
    public int getLayoutId() {
        return R.layout.fragment_consult;
    }

    @Override
    public void initView(View baseView) {
        ButterKnife.bind(this, baseView);
        initToolbar(R.string.title_consult);
        adv.add("http://imgsrc.baidu.com/forum/pic/item/f643dc54564e925850c8af029482d158cdbf4e3a.jpg");
        adv.add("http://img4.cache.netease.com/photo/0026/2015-05-19/APVC513454A40026.jpg");
        adv.add("http://attach.bbs.miui.com/forum/201409/05/164828g71ar48xlpy8xzfl.jpg");
        madv.add("http://imgsrc.baidu.com/forum/pic/item/f643dc54564e925850c8af029482d158cdbf4e3a.jpg");
        madv.add("http://img4.cache.netease.com/photo/0026/2015-05-19/APVC513454A40026.jpg");
        madv.add("http://attach.bbs.miui.com/forum/201409/05/164828g71ar48xlpy8xzfl.jpg");
        bannerAdv.setDelayTime(4500);
        bannerMadv.setDelayTime(4500);
        bannerAdv.setBannerStyle(BannerConfig.CIRCLE_INDICATOR);
        bannerAdv.setIndicatorGravity(BannerConfig.CENTER);
        bannerMadv.setBannerStyle(BannerConfig.CIRCLE_INDICATOR);
        bannerMadv.setIndicatorGravity(BannerConfig.CENTER);
        bannerAdv.setImages(adv);
        bannerMadv.setImages(madv);
    }

    @Override
    public boolean isSwipeBack() {
        return false;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        return getView(inflater, container);
    }

    @Override
    protected void initLazyView(@Nullable Bundle savedInstanceState) {

    }
}
